// vite.config.ts
import { defineConfig } from "file:///D:/phpstudy_pro/WWW/hotel/node_modules/vite/dist/node/index.js";
import react from "file:///D:/phpstudy_pro/WWW/hotel/node_modules/@vitejs/plugin-react/dist/index.mjs";
import { fileURLToPath, URL } from "node:url";
import commonjs from "file:///D:/phpstudy_pro/WWW/hotel/node_modules/vite-plugin-commonjs/dist/index.mjs";
import AutoImport from "file:///D:/phpstudy_pro/WWW/hotel/node_modules/unplugin-auto-import/dist/vite.js";
import Pages from "file:///D:/phpstudy_pro/WWW/hotel/node_modules/vite-plugin-pages/dist/index.js";
import { reactScopedCssPlugin } from "file:///D:/phpstudy_pro/WWW/hotel/node_modules/rollup-plugin-react-scoped-css/dist/index.js";
var __vite_injected_original_import_meta_url = "file:///D:/phpstudy_pro/WWW/hotel/vite.config.ts";
var vite_config_default = defineConfig({
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
    }
  },
  plugins: [
    react(),
    commonjs(),
    reactScopedCssPlugin(),
    Pages({
      dirs: "src/views",
      // 需要生成路由的组件目录
      exclude: ["**/components/*.tsx"]
      // 排除在外的目录，即所有 components 目录下的 .vue 文件都不会生成路由
    }),
    AutoImport({
      imports: ["react", "react-router-dom"]
    })
  ],
  server: {
    //开发服务器的配置
    //反向代理
    proxy: {
      "/hotel": {
        target: "http://www.fast.com/hotel",
        //反向代理的目标地址
        changeOrigin: true,
        //允许跨域
        //替换掉shop前缀 防止多个shop地址
        rewrite: (path) => path.replace(/^\/hotel/, "")
      },
      "/uploads": {
        target: "http://www.fast.com/uploads",
        //反向代理的目标地址
        changeOrigin: true,
        //允许跨域
        //替换掉shop前缀 防止多个shop地址
        rewrite: (path) => path.replace(/^\/uploads/, "")
      }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN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